home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3baudiocdtrackdrag.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  1.7 KB  |  51 lines

  1. /* 
  2.  *
  3.  * $Id: k3baudiocdtrackdrag.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2005 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef _K3B_AUDIO_CDTRACK_DRAG_H_
  17. #define _K3B_AUDIO_CDTRACK_DRAG_H_
  18.  
  19. #include <qdragobject.h>
  20. #include <qcstring.h>
  21. #include <qvaluelist.h>
  22.  
  23. #include <k3btoc.h>
  24. #include <k3bcddbresult.h>
  25. #include <k3bdevice.h>
  26. #include "k3b_export.h"
  27.  
  28. class LIBK3B_EXPORT K3bAudioCdTrackDrag : public QStoredDrag
  29. {
  30.  public:
  31.   K3bAudioCdTrackDrag( const K3bDevice::Toc& toc, const QValueList<int>& cdTrackNumbers, const K3bCddbResultEntry& cddb,
  32.                K3bDevice::Device* lastDev = 0, QWidget* dragSource = 0, const char* name = 0 );
  33.  
  34.   const K3bDevice::Toc& toc() const { return m_toc; }
  35.   const QValueList<int>& cdTrackNumbers() const { return m_cdTrackNumbers; }
  36.   const K3bCddbResultEntry& cddbEntry() const { return m_cddb; }
  37.  
  38.   bool provides( const char* mimetype ) const { return !qstrcmp( mimetype, "k3b/audio_track_drag" ); }
  39.  
  40.   static bool canDecode( const QMimeSource* s ) { return s->provides( "k3b/audio_track_drag" ); }
  41.   static bool decode( const QMimeSource* s, K3bDevice::Toc&, QValueList<int>& trackNumbers, K3bCddbResultEntry&, K3bDevice::Device** dev = 0 );
  42.  
  43.  private:
  44.   K3bDevice::Toc m_toc;
  45.   QValueList<int> m_cdTrackNumbers;
  46.   K3bCddbResultEntry m_cddb;
  47.   K3bDevice::Device* m_device;
  48. };
  49.  
  50. #endif
  51.